]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
grabHelper: Ignore events from On-Screen-Keyboard
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 21 Sep 2012 14:58:03 +0000 (16:58 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 25 Sep 2012 06:25:24 +0000 (08:25 +0200)
GrabHelper automatically releases grabs when the user clicks outside
the grabbed actors. However at least for the message-tray (which is
the only user of grabHelper at the moment), we must ignore any events
from the On-Screen-Keyboard, to prevent the tray from hiding at every
key press.

https://bugzilla.gnome.org/show_bug.cgi?id=683546

js/ui/grabHelper.js
js/ui/keyboard.js

index fccc2fb4da0c0c627ca34b2278cfe7b06f5bc024..8b81b1994bb62dd15b37fdc39ec0b7b6e06c8205 100644 (file)
@@ -318,6 +318,9 @@ const GrabHelper = new Lang.Class({
         if (this._isWithinGrabbedActor(event.get_source()))
             return false;
 
+        if (Main.keyboard.shouldTakeEvent(event))
+            return false;
+
         if (button) {
             // If we have a press event, ignore the next event,
             // which should be a release event.
index 6a4d50833d8617a78b8c523f1512c38c8a4e3e88..09551dc9b280dc3fe8801d9bc5923732a250cc28 100644 (file)
@@ -468,6 +468,12 @@ const Keyboard = new Lang.Class({
         }
     },
 
+    shouldTakeEvent: function(event) {
+        let actor = event.get_source();
+        return Main.layoutManager.keyboardBox.contains(actor) ||
+               actor._extended_keys || actor.extended_key;
+    },
+
     show: function () {
         this._redraw();